package turistic.GUI.graphic;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class RegActivity extends Activity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.registration);
		Button okB = (Button) findViewById(R.id.regB);
		okB.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				// TODO Auto-generated method stub
			/*	EditText user = (EditText) findViewById(R.id.editText2);
				String userStr = user.getText().toString();

				EditText pass = (EditText) findViewById(R.id.editText3);
				String passStr = pass.getText().toString();

				EditText email = (EditText) findViewById(R.id.loginEmail);
				String emailStr = email.getText().toString();

				// messageBox(userStr +" "+ passStr +" " + emailStr);
			*/
				startActivity(new Intent(RegActivity.this,
						TurisztikaiUtvonalTervezoActivity.class));

			}
		});
			
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
			startActivity(new Intent(RegActivity.this,
					TurisztikaiUtvonalTervezoActivity.class));
			return true;
		}

		return super.onKeyDown(keyCode, event);
	}

	private void messageBox(String mess) {
		final AlertDialog alertDialog;
		alertDialog = new AlertDialog.Builder(this).create();

		alertDialog.setTitle("Uzenet");
		alertDialog.setMessage(mess);

		alertDialog.show();

	}

}
